package io.renren.temp;

public enum MybatisCodeEnum implements CreateCodeEnum{


    RPC_MODEL("code_status_model.jsp","/model/",".java"),
    RPC_DAO("mybatis_dao.java.vm","/dao/","Dao.java"),
    RPC_DAOXML("mybatis_dao_xml.java.vm","/cache/","Cache.java"),
    RPC_SERVICE_IMPL("code_status_service_impl.java.vm","/service/","ServiceImpl.java"),

    //api service项目
    API_SERVICE("code_status_service.java.vm","/service/","Service.java"),
    API_DTO_REQUEST("code_status_request_dto.java.vm","/dto/request/","RequestDto.java"),
    API_DTO_RESPONSE("code_status_response_dto.java.vm","/dto/response/","ResponseDto.java"),

    //http service项目
    HTTP_VO_REQUEST("code_status_request_vo.java.vm","/vo/request/","RequestVo.java"),
    HTTP_VO_RESPONSE("code_status_response_vo.java.vm","/vo/response/","ResponseVo.java"),
    HTTP_FACADE("code_status_facade.java.vm","/facade/","Facade.java"),
    HTTP_CONTROLLER("code_status_controller.java.vm","/controller/","Controller.java"),
    HTTP_CONTROLLER_WEB("code_status_controller_web.java.vm","/controller/","WebController.java"),
    ;

    private String temp;
    private String path;
    private String ext;

    MybatisCodeEnum(String temp, String path, String extName){
        this.temp = temp;
        this.path = path;
        this.ext = extName;
    }

    public String getTemp() {
        return temp;
    }

    public String getPath() {
        return path;
    }

    public String getExt() {
        return ext;
    }

    public int getIndex(){
        switch (this){
            case RPC_MODEL:
            case RPC_DAO:
            case RPC_DAOXML:
            case RPC_SERVICE_IMPL:
                return 1;
            case API_SERVICE:
            case API_DTO_REQUEST:
            case API_DTO_RESPONSE:
                return 2;
            case HTTP_CONTROLLER:
            case HTTP_CONTROLLER_WEB:
            case HTTP_FACADE:
            case HTTP_VO_REQUEST:
            case HTTP_VO_RESPONSE:
                return 3;
             default:
                 return 0;

        }
    }

}
